import React,{useState} from 'react'
import './Operationlog.scss'
import {
  HomeOutlined,
  SyncOutlined,
  SearchOutlined
} from '@ant-design/icons';
import './Operationlog.scss'
import { Col, Input, Row, Button, Select, DatePicker } from 'antd';
import OperationlogList from '../../../components/Systemmanagement/OperationlogList'


export default function Operationlog() {

  const [time,setTime] = useState('')

  const Time = (e)=>{
    // console.log(e);
    setTime(e)
  }

  const submit = ()=>{
    console.log(time);
  }


  return (
    <div className='Operationlog'>

      <div className='Operationlogs'>
        <div className='icon'>
          <HomeOutlined className='home' />
          <p>首页 / 系统管理 / 操作日志</p>
        </div>

        <div className='refresh'>
          <a href="">
            <Button type="default" shape="round" icon={<SyncOutlined />} size='large'>
              刷新
            </Button>
          </a>
        </div>
      </div>

      <div className='Operationlog-search'>
        <Row gutter={24}>
          <span>操作人员：</span>
          <Col span={6}>
            <Select defaultValue="路人甲" style={{ width: 120 }} >
              <Select.Option value="jia">路人甲</Select.Option>
              <Select.Option value="yi">炮灰已</Select.Option>
              <Select.Option value="bing">流氓丙</Select.Option>
              <Select.Option value="ding">土匪已</Select.Option>
            </Select>
          </Col>

          <Col span={9}>
            <DatePicker />
          </Col>

          <Button type="default" className='btn2'>
            <SearchOutlined className='riqi' /> 查询
          </Button >
        </Row>

      </div>

      <div className='Operationlog-body'>
        <div className='Operationlog-body-list'>
          <span>数据列表</span>
          <div>
            <Row gutter={20}>
              <span>清除日志:</span>

              <Col span={12}>
                <Select placeholder="请选择时间" style={{ width: 120 }} onChange={Time}>
                  <Select.Option value="week">一周前</Select.Option>
                  <Select.Option value="harf-month">半月前</Select.Option>
                  <Select.Option value="month">一月前</Select.Option>
                  <Select.Option value="diharf-yesr">半年前</Select.Option>
                </Select>
              </Col>

              <Col span={6}>
                <Button type="default" className='btn3' onClick={submit}>
                   确定
                </Button >
              </Col>
            </Row>
          </div>
        </div>

        <OperationlogList />

      </div>
    </div>
  )
}
